Optimal. Leaf size=102 \[ \frac {a (A+B+C) \sin (c+d x)}{d}+\frac {a (3 A+4 (B+C)) \sin (c+d x) \cos (c+d x)}{8 d}-\frac {a (A+B) \sin ^3(c+d x)}{3 d}+\frac {1}{8} a x (3 A+4 (B+C))+\frac {a A \sin (c+d x) \cos ^3(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4074, 4047, 2635, 8, 4044, 3013} \[ \frac {a (A+B+C) \sin (c+d x)}{d}+\frac {a (3 A+4 (B+C)) \sin (c+d x) \cos (c+d x)}{8 d}-\frac {a (A+B) \sin ^3(c+d x)}{3 d}+\frac {1}{8} a x (3 A+4 (B+C))+\frac {a A \sin (c+d x) \cos ^3(c+d x)}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3013
Rule 4044
Rule 4047
Rule 4074
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {a A \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {1}{4} \int \cos ^3(c+d x) \left (-4 a (A+B)-a (3 A+4 (B+C)) \sec (c+d x)-4 a C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a A \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {1}{4} \int \cos ^3(c+d x) \left (-4 a (A+B)-4 a C \sec ^2(c+d x)\right ) \, dx+\frac {1}{4} (a (3 A+4 (B+C))) \int \cos ^2(c+d x) \, dx\\ &=\frac {a (3 A+4 (B+C)) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a A \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {1}{4} \int \cos (c+d x) \left (-4 a C-4 a (A+B) \cos ^2(c+d x)\right ) \, dx+\frac {1}{8} (a (3 A+4 (B+C))) \int 1 \, dx\\ &=\frac {1}{8} a (3 A+4 (B+C)) x+\frac {a (3 A+4 (B+C)) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a A \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {\operatorname {Subst}\left (\int \left (-4 a (A+B)-4 a C+4 a (A+B) x^2\right ) \, dx,x,-\sin (c+d x)\right )}{4 d}\\ &=\frac {1}{8} a (3 A+4 (B+C)) x+\frac {a (A+B+C) \sin (c+d x)}{d}+\frac {a (3 A+4 (B+C)) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a A \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {a (A+B) \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.41, size = 97, normalized size = 0.95 \[ \frac {a (24 (3 A+3 B+4 C) \sin (c+d x)+24 (A+B+C) \sin (2 (c+d x))+8 A \sin (3 (c+d x))+3 A \sin (4 (c+d x))+24 A c+36 A d x+8 B \sin (3 (c+d x))+48 B c+48 B d x+48 C d x)}{96 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 87, normalized size = 0.85 \[ \frac {3 \, {\left (3 \, A + 4 \, B + 4 \, C\right )} a d x + {\left (6 \, A a \cos \left (d x + c\right )^{3} + 8 \, {\left (A + B\right )} a \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, A + 4 \, B + 4 \, C\right )} a \cos \left (d x + c\right ) + 8 \, {\left (2 \, A + 2 \, B + 3 \, C\right )} a\right )} \sin \left (d x + c\right )}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.22, size = 218, normalized size = 2.14 \[ \frac {3 \, {\left (3 \, A a + 4 \, B a + 4 \, C a\right )} {\left (d x + c\right )} + \frac {2 \, {\left (9 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 49 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 28 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 60 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 31 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 52 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 84 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 39 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.46, size = 141, normalized size = 1.38 \[ \frac {a A \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+\frac {a B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+a B \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a C \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 132, normalized size = 1.29 \[ -\frac {32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a + 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a - 96 \, C a \sin \left (d x + c\right )}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.55, size = 209, normalized size = 2.05 \[ \frac {\left (\frac {3\,A\,a}{4}+B\,a+C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {49\,A\,a}{12}+\frac {7\,B\,a}{3}+5\,C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {31\,A\,a}{12}+\frac {13\,B\,a}{3}+7\,C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {13\,A\,a}{4}+3\,B\,a+3\,C\,a\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (3\,A+4\,B+4\,C\right )}{4\,\left (\frac {3\,A\,a}{4}+B\,a+C\,a\right )}\right )\,\left (3\,A+4\,B+4\,C\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________